package com.sf.marathon.soul.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.sf.marathon.soul.vo.AreasVO;
import com.sf.marathon.soul.vo.CitiesVO;
import com.sf.marathon.soul.vo.ProvincesVO;

/**
 * <p>
  * 集货拼团表 Mapper 接口
 * </p>
 *
 * @author mokeo
 * @since 2017-12-15
 */
public interface QueryCommonMapper {

    /**
     * 获取省
     * @return
     */
    @Select("select provinceid,province from provinces")
    List<ProvincesVO> getProvinces();

    /**
     * 获取市
     * @param provinceid
     * @return
     */
    @Select("select cityid,city from cities where provinceid=#{provinceid}")
    List<CitiesVO> getCities(@Param("provinceid") String provinceid);

    /**
     * 获取地区
     * @param cityid
     * @return
     */
    @Select("select areaid,area from areas where cityid=#{cityid}")
    List<AreasVO> getAreas(@Param("cityid") String cityid);
}